﻿@model CoreData.Plans
@{ 
    ViewBag.Title = "Update Plans and Pricing";
}
<div class="row-fluid">
    <div class="span12">
      <div class="head">
            <div class="isw-documents">
            </div>
            <h1>
                Detail</h1>
                <ul class="buttons">
                    <li><a href="#" class="isw-settings"></a>
                        <ul class="dd-list" style="display: none;">
                         @if (Helper.SessionManagement.Value("pvalue").Contains("C"))
                         {
                            <li><a href="@Url.Action("AddOrUpdate", "PlansManagement")"><span class="isw-plus"></span>Add new</a></li>
                         }
                         </ul>
                    </li>
            </ul>
            <div class="clear">
            </div>       
                  
        </div>
        <div class="block-fluid tabs">
            <ul>
                <li><a href="#tabs-1">Content</a></li>
                <li><a href="#tabs-2">SEO Management</a></li>
                @* <li><a href="#tabs-3">Thuộc tính</a></li>*@
            </ul>
            @using (Ajax.BeginForm("AddOrUpdate", "PlansManagement", new AjaxOptions { OnSuccess = "Success", HttpMethod = "Post" }, new { enctype = "multipart/form-data", @id = "validation" }))
            {
                <div class="warning-area">
                </div>
                <div id="tabs-1">
                    @Html.HiddenFor(x => x.ID)
                    <div class="row-form">
                        <div class="span2">
                            Code:</div>
                        <div class="span9">
                            @Html.TextBoxFor(x => x.Code, new { @class = "validate[required]" })</div>
                        <div class="clear">
                        </div>
                    </div>
                    <div class="row-form">
                        <div class="span2">
                            Name:</div>
                        <div class="span9">
                            @Html.TextBoxFor(x => x.Name, new { @class = "validate[required]" })</div>
                        <div class="clear">
                        </div>
                    </div>
                    <div class="row-form">
                        <div class="span2">
                            Image :</div>
                        <div class="span8">
                            <input id="fileupload" type="file" name="file" />
                            @if (Model != null && Model.Image != null && Model.Image != "")
                            {
                                <div id="image">
                                    <img src="@Url.Content("~/Media/Plans/" + Model.Image)" width="70px" height="70px" alt="@Model.Image" />
                                </div>
                          
                            }
                            else
                            {
                                <div id="image">
                                </div>
                            }
                        </div>
                        <div class="clear">
                        </div>
                    </div>
                    <div class="row-form">
                        <div class="span2">
                            Price :</div>
                        <div class="span9">
                            @Html.TextBoxFor(x => x.Price, new { @class = "validate[required,custom[integer]]",@style="width:200px" }) USD</div>
                        <div class="clear">
                        </div>
                    </div>
                    <div class="row-form">
                        <div class="span2">
                            Content</div>
                        <div class="span9">
                            @Html.TextAreaFor(x => x.Description, new { @cols = "10", @rows = "10" })</div>
                        <div class="clear">
                        </div>
                    </div>
                    
                    <div class="row-form">
                        <div class="span2">
                            Published :</div>
                        <div class="span9">
                            @Html.CheckBoxFor(x => x.Active)</div>
                        <div class="clear">
                        </div>
                    </div>
                </div>
            
                <div id="tabs-2">
                    
                    <div class="row-form">
                        <div class="span2">
                            Meta Title :</div>
                        <div class="span9">
                            @Html.TextAreaFor(x => x.MetaTitle)</div>
                        <div class="clear">
                        </div>
                    </div>
                    <div class="row-form">
                        <div class="span2">
                            Meta Keyword :</div>
                        <div class="span9">
                            @Html.TextAreaFor(x => x.MetaKeyword)</div>
                        <div class="clear">
                        </div>
                    </div>
                    <div class="row-form">
                        <div class="span2">
                            Meta Description :</div>
                        <div class="span9">
                            @Html.TextAreaFor(x => x.MetaDescription)</div>
                        <div class="clear">
                        </div>
                    </div>
                </div>
                            if (Helper.SessionManagement.Value("pvalue").Contains("C") || Helper.SessionManagement.Value("pvalue").Contains("U"))
                            {
                <div class="row-form">
                    <div class="span2">
                    </div>
                    <div class="span9">
                        <input type="submit" class="btn btn-info span3" value="Cập nhật" /></div>
                    <div class="clear">
                    </div>
                </div>
                            }

            }
        </div>
    </div>
</div>
